//============================================================================
// Name        : CourseRegistration.cpp
// Author      : Sartios
// Version     :
// Copyright   : Savramis Sartios
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <string>
#include <map>
using namespace std;
#include "Controllers/CourseRegistration/CourseRegistrationCreator.h"
#include "Domain/CourseRegistration/CourseList/CourseList.h"
int main() {

	string 	*	aem = new string;
	string 	*	courseCode = new string;
	string 	*	teacherCode = new string;

	map<string *,string *> *myCourses=new map<string *,string *>;
	//map<string *,string *>::iterator *it=new map<string *,string *>::iterator;

	ICourseRegistration *registration=0;
	ICourseRegistrationCreator *creator = new CourseRegistrationCreator;

	cout<<"\nEnter A.E.M. : ";
	cin>>*aem;

	for(int i=0;i<2;i++){
		cout<<"\nEnter course code : ";
		cin>>*courseCode;
		cout<<"\nEnter teacher code : ";
		cin>>*teacherCode;
		myCourses->insert(pair<string *,string *>(courseCode,teacherCode));
	}
	//*it=myCourses->begin();
	//cout<<*((*it)->first)<<"=>"<<*((*it)->second);

	registration = creator->getCourseRegistration(aem,myCourses);
	cout<<*registration->getOwner();

	delete aem;
	delete courseCode;
	delete teacherCode;
	delete myCourses;

}
